#include <stdio.h>
#include <stdlib.h>
#include "stu.h"


int main(int argc, char *argv[])
{
    cls *cls_all = (cls *)malloc(sizeof(cls));
    cls_all->num = 0;
    cls_all->is_load = 0;
    int input;

    while (1) {
        printf("****************************\n");
        printf("1.录入 2.查询 3.列表 -1.退出\n");
        printf("****************************\n");
        printf(">> ");
        
        scanf("%d", &input);
        getchar();

        switch (input) {
            case ADD:
                add(cls_all);
                break;
            case SEARCH:
                printf("I am search.\n");
                break;
            case LIST:
                list(cls_all);
                break;
            case QUIT:
                printf("bye.\n");
                return 0;
            default:
                printf("错误， 请重新输入.\n");
                continue;
        }

    }

    return 0;
}
